package cmd;

import hxd.Pixels;

class Cmd_ChangeLayerColors extends Cmd {
    var ncolors : Array<Int>;
    var ocolors : Array<Int>;
    var layer : Int;
    public function new(layer, colors) {
        super();
        this.layer = layer;
        this.ncolors = colors;
    }
    override function Do() {
        super.Do();
        ocolors = data_canvas.ChangeLayerColors(layer, ncolors);
    }

    override function Undo() {
        super.Undo();
        data_canvas.ChangeLayerColors(layer, ocolors);
    }
}